﻿using System;
using System.Collections.Generic;

namespace Flagwind.Options.Configuration
{
	public class ConnectionStringElement : SettingElement
	{
		#region 常量定义

		private const string XML_PROVIDER_ATTRIBUTE = "provider";

		#endregion

		#region 构造方法

		public ConnectionStringElement()
		{
		}

		public ConnectionStringElement(string name, string value, string provider = null) : base(name, value)
		{
			this.Provider = provider;
		}

		#endregion

		#region 公共属性

		[OptionConfigurationProperty(XML_PROVIDER_ATTRIBUTE)]
		public string Provider
		{
			get
			{
				return (string)this[XML_PROVIDER_ATTRIBUTE];
			}
			set
			{
				this[XML_PROVIDER_ATTRIBUTE] = value;
			}
		}

		#endregion
	}
}